package com.zhangln.mountbuzhou.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import lombok.*;
import lombok.experimental.Accessors;

/**
 * <p>
 * 客户端在线情况日志表
 * </p>
 *
 * @author sherry
 * @since 2020-04-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_connection_log")
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class TbConnectionLogEntity implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * channelId websocke连接id
     */
    private String channelId;

    /**
     * 动作 1-连接
2-注册成功
3-注册失败
4-心跳包
5-客户端掉线
6-服务端主动断开
99-其他
     */
    private Integer actionType;

    /**
     * 备注
     */
    private String note;

    /**
     * 区域编码
     */
    private String area;

    /**
     * 机构编码
     */
    private String orgCode;

    /**
     * 用户id
     */
    private String userId;

    /**
     * 乐观锁
     */
    private Integer revision;

    /**
     * 创建人
     */
    private String createdBy;

    /**
     * 创建时间
     */
    private LocalDateTime createdTime;

    /**
     * 更新人
     */
    private String updatedBy;

    /**
     * 更新时间
     */
    private LocalDateTime updatedTime;


    public static final String ID = "id";

    public static final String CHANNEL_ID = "channel_id";

    public static final String ACTION_TYPE = "action_type";

    public static final String NOTE = "note";

    public static final String AREA = "area";

    public static final String ORG_CODE = "org_code";

    public static final String USER_ID = "user_id";

    public static final String REVISION = "revision";

    public static final String CREATED_BY = "created_by";

    public static final String CREATED_TIME = "created_time";

    public static final String UPDATED_BY = "updated_by";

    public static final String UPDATED_TIME = "updated_time";

}
